<template>
  <div class="bbb">
    <h3>Bbb</h3>
    <div>{{ mes }}</div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      mes: ''
    }
  },
  mounted () {
    this.$bus.$on('a-b', mes => {
      this.mes = mes
      console.log('a-b')
    })
  },
  beforeDestroy () {
    this.$bus.$off('a-b')
  }
}
</script>

<style lang="scss" scoped>
.bbb {
  width: 300px;
  height: 300px;
  border: 5px solid red;
}
</style>
